@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Noticia+Text&family=Rampart+One&display=swap');
body {
  font-family: 'Noticia Text', serif;
  background-image: linear-gradient(#ADD8E6, white);
  border: solid;
  color: #00006b;
}
h1, h2, h3 {
  font-family: 'Rampart One', cursive;
  text-align: center;
}
h4 {
  font-family: 'Dancing Script', cursive;
  text-align: center;
}
.border {
  border: solid;
  border-color: #00006b;
}

⌁ My Meme ⌁

This four panel meme depicts SpongeBob SquarePants a popular cartoon character reading a letter with a puzzled look. He casts the letter into a fire showing his disapporval of the message on it. My meme is supposed to be a bit of banter but in reality I am really enjoying the course!


library(magick)

# Reading images as individual panels
panel_one <- image_read("meme_panels/spongebob_1.jpg")
panel_three <- image_read("meme_panels/spongebob_3.jpg")
panel_four <- image_read("meme_panels/spongebob_4.jpg")

# Creating blank panel with just text
panel_two <- image_blank(width = 620,
                         height = 736,
                         color = "#FFFFFF") %>%
  image_annotate(text = "Stats 220\nis fun",
                 color = "#000000",
                 size = 80,
                 font = "Impact",
                 gravity = "center")

# Merging panels into their respective rows
first_row <- c(panel_one, panel_two) %>%
  image_append()
second_row <- c(panel_three, panel_four) %>%
  image_append()

# Stacking rows together
meme <- c(first_row, second_row) %>%
  image_append(stack = TRUE)

meme %>%
  image_write("my_meme.png")

⌁ My Animated GIF ⌁

The dancing banana GIF is a popular internet meme chracter! I have split the GIF frames and added text onto each one with disco colouring to make it more chaotic!


library(magick)

# Storing frames as objects and adding text
frame_one <- image_read("animation_frames/frame_1.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#FF0000",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#FF0000",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_two <- image_read("animation_frames/frame_2.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#FFA500",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#FFA500",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_three <- image_read("animation_frames/frame_3.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#FFFF00",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#FFFF00",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_four <- image_read("animation_frames/frame_4.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#00FF00",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#00FF00",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_five <- image_read("animation_frames/frame_5.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#023020",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#023020",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_six <- image_read("animation_frames/frame_6.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#ADD8E6",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#ADD8E6",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_seven <- image_read("animation_frames/frame_7.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#00008B",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#00008B",
                 font = "Impact",
                 gravity = "south",
                 size = 80)
frame_eight <- image_read("animation_frames/frame_8.jpg") %>%
  image_annotate(text = "DANCING",
                 color = "#A020F0",
                 font = "Impact",
                 gravity = "north",
                 size = 80) %>%
  image_annotate(text = "BANANA",
                 color = "#A020F0",
                 font = "Impact",
                 gravity = "south",
                 size = 80)

# Putting frames into a vector
frames <- c(frame_one, frame_two, frame_three, frame_four, frame_five,
            frame_six, frame_seven, frame_eight)

# Creating the gif
animation <- image_animate(frames, fps = 10)

# Display and save the gif
animation %>%
  image_write("my_animation.gif")